package com.fast.cms.constant;

/**
 * 消息类型
 * @author lushuifa242
 */
public enum MsgTypeEnum {
	
	/**
	 * 1,"资讯类型信息"
	 */
	article(1,"资讯类型信息"),
	
	/**
	 * 2,"公告"
	 */
	notice(2,"公告"),
	
	/**
	 * 3,"公文"
	 */
	doc(3,"公文"),
;
	
	private int code;
	private String value;
	
	MsgTypeEnum(int code,String value){
		this.code = code;
		this.value = value;
	}
	
	// 获取对应的文本
	public static String getName(int code) {
		for (MsgTypeEnum c : MsgTypeEnum.values()) {
		  if (c.getCode() == code) {
		     return c.value;
		  }
		}
		return null;
	}
	
	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}
}
